//package com.example.demo.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.env.Environment;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import javax.annotation.Resource;
//
///**
// * @Description TODO
// * @Date 2024/3/29 15:50
// * @Author ShaoJie Cen
// */
//@Configuration
//public class InterceptorConfiguration implements WebMvcConfigurer {
//
//    @Resource
//    private Environment env;
//
////    @Resource
////    private AuthorizationInterceptor authorizationInterceptor;
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//
//        String[] swaggerExcludePathPatterns = {"/doc.html","/swagger**/**","/swagger-resources/**","/webjars/**","/v3/**"};
//        registry.addInterceptor(null).addPathPatterns("/**");
//        if("dev".equals(env.getProperty("spring.profiles.active"))){
//        }else{
//            swaggerExcludePathPatterns = new String[0];
//        }
//        registry.addInterceptor(null)
//                .excludePathPatterns("/user/logout")
//                .excludePathPatterns("/user/login")
//
//                .excludePathPatterns(swaggerExcludePathPatterns)
//                .addPathPatterns("/**").order(-1);
//    }
//
//}
